class ListModeFilters {

	/**
	 * Es possa per defecte un mode de visionat de llitats, 
	 * per a tots els llistats menys de comentaris
	 */
    def filters = {
        all(controller:'*', action:'*') {
            before = {
        		if(session.userViewMode == null) {
					session['userViewMode'] = 'flow'
				}
				
				if(session.noteViewMode == null) {
					session['noteViewMode'] = 'flow'
				}
				
				if(session.comicViewMode == null) {
					session['comicViewMode'] = 'flow'
				}
			
				if(session.pageViewMode == null) {
					session['pageViewMode'] = 'flow'
				}
				
				if(session.alterPageViewMode == null) {
					session['alterPageViewMode'] = 'flow'
				}
        		return true
            }
            after = {
                return true
            }
            afterView = {
                return true
            }
        }
    }
    
}
